//
//  GZSQLTool.h
//  GZSQLModelTool_Example
//
//  Created by Guo Rui on 2018/1/25.
//  Copyright © 2018年 GR. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 uid -> 1个用户 -> 1个数据库
 */

typedef void(^GZSQLToolBOOLParamBlock)(BOOL success);
typedef void(^GZSQLToolArryParamBlock)(NSArray *array);

@interface GZSQLTool : NSObject


/**
 执行普通的DDL\DML语句
 */
+ (BOOL)executeUpdate:(NSString *)sql uid:(NSString *)uid;

/**
 用于数据绑定方式的DDL\DML语句
 */
+ (BOOL)executeUpdate:(NSString *)sql withArgumentsInArray:(NSArray *)arguments uid:(NSString *)uid;

+ (NSArray <NSDictionary *>*)executeQuery:(NSString *)sql uid:(NSString *)uid;

+ (NSArray <NSDictionary *>*)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments uid:(NSString *)uid;

/**
 批处理一批sql语句

 @param sqls 多条sql语句
 @param uid 数据库名
 */
+ (BOOL)executeStatements:(NSString *)sqls uid:(NSString *)uid;

@end
